// 强制执行申请书 api
import request from '@/utils/request'

// 查询列表
export function listCompulsoryItemApprovalResult(query) {
  return request({
    url: '/ruoyi-system/compulsoryItemApprovalResult/list',
    method: 'get',
    params: query,
  })
}

// 查询审批详细
export function getCompulsoryItemApprovalResult(id) {
  return request({
    url: '/ruoyi-system/compulsoryItemApprovalResult/' + id,
    method: 'get',
  })
}

// 新增审批
export function addCompulsoryItemApprovalResult(data) {
  return request({
    url: '/ruoyi-system/compulsoryItemApprovalResult',
    method: 'post',
    data: data,
  })
}

// 修改审批
export function updateCompulsoryItemApprovalResult(data) {
  return request({
    url: '/ruoyi-system/compulsoryItemApprovalResult',
    method: 'put',
    data: data,
  })
}

// 删除审批
export function delCompulsoryItemApprovalResult(id) {
  return request({
    url: '/ruoyi-system/compulsoryItemApprovalResult/' + id,
    method: 'delete',
  })
}

// 预览

export function previewCompulsoryItemApprovalResult(params) {
  return request({
    url: '/ruoyi-system/compulsoryItemApprovalResult/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/compulsoryItemApprovalResult/pdfPreview',
    method: 'post',
    data,
  })
}

// 保存附件
export function addCompulsoryItemApprovalResultFiles(data) {
  return request({
    url: '/ruoyi-system/compulsoryItemApprovalResult/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportCompulsoryItemApprovalResult(data) {
  return request({
    url: '/ruoyi-system/compulsoryItemApprovalResult/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/compulsoryItemApprovalResult/caseList',
    method: 'get',
  })
}

// 获取处罚决定书填的内容呢
export function getContent(id) {
  return request({
    url: '/ruoyi-system/compulsoryItemApprovalResult/getContent?caseId=' + id,
    method: 'get',
  })
}
